import { createRouter, createWebHistory } from 'vue-router';
import Login from '@/views/login/Login.vue';
import Layout from '@/views/layout/Layout.vue';
import Index from '@/views/index/Index.vue';
import DjjAppliances from '@/views/djj/djjAppliances.vue';
import DjjBasket from '@/views/djj/djjBasket.vue';
import DjjSink from '@/views/djj/djjSink.vue';
import DjjSoft from '@/views/djj/djjSoft.vue';
import DjjStones from '@/views/djj/djjStones.vue';
import SnKitchenStorage from '@/views/storage/snKitchenStorage.vue';
import SnOtherStorage from '@/views/storage/snOtherStorage.vue';



const routes = [
  { path: '/index',
    component: Layout,
    children: [
      { path: '/index', component: Index },
      { path: '/djjAppliances', component: DjjAppliances },
      { path: '/djjBasket', component: DjjBasket },
      { path: '/djjSink', component: DjjSink },
      { path: '/djjSoft', component: DjjSoft },
      { path: '/djjStones', component: DjjStones },
      { path: '/snKitchenStorage', component: SnKitchenStorage },
      { path: '/snOtherStorage', component: SnOtherStorage }
    ]
  },
  { path: '/', component: Login,redirect: '/login' },
  { path: '/login', component: Login }
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
